
#define ATS_DYNLOADFLAG 0 // loaded by [ats_main_prelude]

staload "generator.sats"
staload "container.sats"
                      
assume container = List

implement{a} new_container() = list_nil

(* Runtime error if not found. *)
implement{a} get_from_container(id,container,cmp) = case- container of
  | list_cons(h,rest) => if cmp(id,h) then h else get_from_container(id,rest,cmp)
  
implement{a} save_to_container(obj,container) = let
  val () = container := list_cons(obj,container)
  in end
  
implement{a} remove_from_container(id,dst) = ()